The present invention relates to a particle recognition apparatus for separating a particle from a halftone image of a to-be-measured particle group represented by a fertilizer, exploded splinters, or vegetables or fruits and recognizing the particle of an element and, more particularly, to a particle recognition apparatus used to measure a particle size distribution or analyze the shape of a pore in a metal, mineral, or fiber.
As particle recognition apparatuses of this type, conventionally, there are particle recognition apparatuses using labeling or particle recognition apparatuses using distance transform.
[Particle Recognition Apparatus Using Labeling (Prior Art 1)]
A particle recognition apparatus using labeling recognizes a particle with the following procedures.
(1): A particle group to be measured is photographed to obtain a halftone image.
(2): The halftone image obtained in (1) is binarized (xe2x80x9c0xe2x80x9d, xe2x80x9c1xe2x80x9d) to obtain a binary image (FIG. 11(a)).
(3): The binary image obtained in (2) is labeled to obtain a label image (FIG. 11(b)).
(4): Each label ({circle around (1)} to {circle around (6)}) is recognized as one particle.
[Particle Recognition Apparatus Using Distance Transform (Prior Art 2)]
A particle recognition apparatus using distance transform recognizes a particle with the following procedures.
(1): A particle group to be measured is photographed to obtain a halftone image.
(2): The halftone image obtained in (1) is binarized (xe2x80x9c0xe2x80x9d, xe2x80x9c1xe2x80x9d) to obtain a binary image.
(3): The binary image obtained in (2) is subjected to distance transform to obtain a distance-transformed image (FIG. 12(a)).
(4): An image Dk obtained by extracting pixels with values equal to or larger than a threshold value k from the distance-transformed image obtained in (3) to obtain a resultant image line Ok (FIG. 13(a)).
(5): The resultant image line Ok obtained in (4) is subjected to exclusive expansion to obtain an image E (FIG. 13(b)).
(6): A cuttable image C (FIG. 13(d)), uncuttable image I (FIG. 13(e)), and new image N (FIG. 13(f)) are classified from an image Dkxe2x88x921 (FIG. 13(c)).
(7): The image C and image E are ANDed to obtain an image A (FIG. 13(g)).
(8): The image N is smoothed to obtain an image Nxe2x80x2 (FIG. 13(h)).
(9): The image A, image I, and image Nxe2x80x2 are ORed to obtain an image Okxe2x88x921 (FIG. 13(i)).
(10): Steps (5) to (9) are repeated while decrementing the value k to 1, thereby obtaining a particle-separated image.
(11): The particle-separated image obtained in (10) is labeled to obtain a label image (FIG. 12(b)).
(12):: Each label ({circle around (1)} to {circle around (7)}) is recognized as one particle.
Note that the particle recognition technique using distance transform is disclosed in, e.g., Japanese Patent Laid-Open No. 62-211783 (image processing apparatus).
However, according to such a conventional particle recognition apparatus, in the particle recognition apparatus (prior art 1) using labeling, if a plurality of particles in contact with each other are binarized into the binary image, the plurality of particles in contact are recognized as one particle, resulting in low particle recognition accuracy.
More specifically, in particle recognition using an image, generally, the halftone image of particles is often unclear because of the particle photographing environment, Additionally, in the binary image obtained by binarization, a plurality of particles are often binarized in contact with each other. However, the particle recognition apparatus using labeling often recognizes particles in contact with each other as one particle. This often affects the particle recognition result.
If the binarization level is raised to avoid this problem, particles may be recognized as particles with much smaller sizes, or small particles may disappear.
On the other hand, in the particle recognition apparatus (prior art 2) using distance transform, even when a plurality of particles are binarized into a binary image in contact with each other, they can be recognized as the plurality of particles, respectively. This allows accurate particle recognition. However, since this apparatus uses exclusive expansion processing in separating particles, a phenomenon occurs in which the shape of a separated particle becomes different from the original particle shape. Hence, it is difficult to use this apparatus for the application purpose such as pore shape analysis of a metal or mineral. In addition, this apparatus must repeatedly perform not only calculation for distance transform but also calculation for degeneration for image separation, labeling, exclusive expansion, OR, and AND a plurality of number of times, and the calculation amount is enormous. This takes a long processing time, so this apparatus can be introduced only in an environment with a lenient time limitation.
In a chemical plant for a fertilizer or chemical material, the particle size distribution of a particle group being carried on a belt is measured, and the particle size distribution measurement result is used as feedback information to control the charging amount of a material or water. For this purpose, the particle recognition result must be quickly obtained, and the processing time of particle size distribution measurement is also required to be shorter. In a chemical plant for a fertilizer or chemical material, the processing time taken for particle size distribution measurement must be several sec or shorter. Because of the problem of accuracy, prior art 1 is difficult to use. Prior art 2 cannot be used because it takes several min for particle size distribution measurement due to the enormous calculation amount.
The present invention has been made to solve the above problem, and has as its object to provide a particle recognition apparatus capable of recognizing a particle at a high speed and high accuracy.
In order to achieve the above object, the first invention comprises image input means (1) for obtaining a halftone image (IG) of a particle group to be measured, binarization means (2) for binarizing the halftone image (IG) obtained by the image input means(1) to obtain a binary image (IB), distance transform means (3) for performing distance transform for the binary image (IB) binarized by the binarization means (2) to obtain a distance-transformed image (ID), particle nucleus extraction means (4) for performing particle nucleus extraction processing for the distance-transformed image (ID) obtained by the distance transform means (3) to obtain a particle nucleus image (IC), and particle expansion means (5) for performing particle expansion processing for the particle nucleus image (IC) obtained by the particle nucleus extraction means (4) and the distance-transformed image (ID) obtained by the distance transform means (3) to obtain a particle-separated image (IS).
According to this invention, the halftone image (IG) of the particle group to be measured is binarized into the binary image (IB), the binary image (IB) is subjected to distance transform to obtain the distance-transformed image (ID), and the distance-transformed image (ID) is subjected to particle nucleus extraction processing to obtain the particle nucleus image (IC), and the particle nucleus image (IC) and distance-transformed image (ID) are subjected to particle expansion processing to obtain the particle-separated image (IS).
According to the second invention, in the first invention, particle nucleus candidates are obtained from the distance-transformed image (ID), and a particle nucleus is extracted on the basis of the distance between the particle nucleus candidates.
According to this invention, the particle nucleus candidates are obtained from the distance-transformed image (ID), the particle nucleus is extracted on the basis of the distance between the particle nucleus candidates to obtain the particle nucleus image (IC), and the particle nucleus image (IC) and distance-transformed image (ID) are subjected to particle expansion processing to obtain the particle-separated image (IS).
According to the third invention, in the first invention, parameter setting means for setting a separation parameter (PS) that defines a degree of extraction of the particle nucleus in the particle nucleus extraction processing is provided, and particle nucleus candidates are obtained from the distance-transformed image (ID), and a particle nucleus is extracted on the basis of the distance between the particle nucleus candidates and the separation parameter (PS).
According to this invention, the particle nucleus is extracted on the basis of the distance between the particle nucleus candidates and separation parameter (PS) to obtain the particle nucleus image (IC), and the particle nucleus image (IC) and distance-transformed image (ID) are subjected to particle expansion processing to obtain the particle-separated image (IS). In this case, the degree of extraction of the particle nuclei (the degree of separation of particles) can be adjusted by changing the separation parameter (PS).
According to the fourth invention, in the second invention, a first intermediate image (IT1) is obtained by adding a value near 3xc3x973 pixels to the distance-transformed image (ID), a second intermediate image (IT2) is obtained by performing filter processing for the first intermediate image (IT1) to output a maximum value near the 3xc3x973 pixels, and a third intermediate image (IT3) representing the particle nucleus candidate is obtained by masking the distance-transformed image (ID) using an image obtained by extracting isoplethic points from the first and second intermediate images (IT1, IT2).
According to this invention, the value near the 3xc3x973 pixels is added to the distance-transformed image (ID) to obtain the first intermediate image (IT1), the first intermediate image (IT1) is subjected to filter processing to output the maximum value near the 3xc3x973 pixels to obtain the second intermediate image (IT2), and the distance-transformed image (ID) is masked using an image obtained by extracting isoplethic points from the first and second intermediate images (IT1, IT2) to obtain the third intermediate image (IT3) representing the particle nucleus candidate. The particle nucleus is extracted on the basis of the distance between the particle nucleus candidates in the third intermediate image (IT3) to obtain the particle nucleus image (IC).
According to the fifth invention, in the third invention, a first intermediate image (IT1) is obtained by adding a value near 3xc3x973 pixels to the distance-transformed image (ID), a second intermediate image (IT2) is obtained by performing filter processing for the first intermediate image (IT1) to output a maximum value near the 3xc3x973 pixels, and a third intermediate image (IT3) representing the particle nucleus candidate is obtained by masking the distance-transformed image (ID) using an image obtained by extracting isoplethic points from the first and second intermediate images (IT1, IT2).
According to this invention, the value near the 3xc3x973 pixels is added to the distance-transformed image (ID) to obtain the first intermediate image (IT1), the first intermediate image (IT1) is subjected to filter processing to output the maximum value near the 3xc3x973 pixels to obtain the second intermediate image (IT2), and the distance-transformed image (ID) is masked using an image obtained by extracting isoplethic points from the first and second intermediate images (IT1, IT2) to obtain the third intermediate image (IT3) representing the particle nucleus candidate. The particle nucleus is extracted on the basis of the distance between the particle nucleus candidates in the third intermediate image (IT3) and the separation parameter (PS) to obtain the particle nucleus image (IC).
According to the sixth invention, in the fifth invention, a fourth intermediate image (IT4) is obtained by multiplying the third intermediate image (IT3) by the separation parameter (PS), a fifth intermediate image (IT5) is obtained by performing inverse distance transform for the fourth intermediate image (IT4), a sixth intermediate image (IT6) is obtained by labeling the fifth intermediate image (IT5), and a particle nucleus image (IC) is obtained by masking the sixth intermediate image (IT6) using the third intermediate image (IT3).
According to this invention, the third intermediate image (IT3) is multiplied by the separation parameter (PS) to obtain the fourth intermediate image (IT4), the fourth intermediate image (IT4) is subjected to inverse distance transform to obtain the fifth intermediate image (IT5), the fifth intermediate image (IT5) is labeled to obtain the sixth intermediate image (IT6), and the sixth intermediate image (IT6) is masked using the third intermediate image (IT3) to obtain the particle nucleus image (IC).
According to the seventh invention, in the first to sixth inventions, particle size distribution calculation means (7) for obtaining a size of each particle from the particle-separated image (IS) obtained by the particle expansion means (5) to calculate a particle size distribution is provided. According to the present invention, the size of each particle is obtained from the particle-separated image (IS) to calculate the particle size distribution.